package com.xuecheng.content.api;

import com.xuecheng.content.model.dto.CourseCategoryTreeDto;
import com.xuecheng.content.service.CourseCategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(value="课程分类相关接口",tags="课程分类相关接口")
@RestController
@RequestMapping("/course-category")
public class CourseCategoryController {
    @Autowired
    CourseCategoryService courseCategoryService;

    @ApiOperation("查询所有课程分类接口")
    @GetMapping("/tree-nodes")
    public List<CourseCategoryTreeDto> treeNodes(){
        return courseCategoryService.queryTreeNodes("1");
    }
}
